﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ClassLibrary;
using System.Web.Services;

namespace OmegapointWeb
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            //LogWriter.Print("Login attempt by " + tbLogin_Username.Text, LogLevel.LOG);
            //try
            //{
            //    WebUser wu = WebUserController.Authenticate(tbLogin_Username.Text, tbLogin_Pass.Text);
            //    if (wu != null)
            //    {
            //        Session["IsLogged"] = true;
            //        Session["WebUser"] = wu;
            //        Session["AllImages"] = ImageDataController.GetAllImageData(wu.UserId);
            //        LogWriter.Print("Login succesful", LogLevel.LOG);
            //        Response.Write("<script type=\"text/javascript\"> console.log(\" hello \"); </script>");
            //    }
            //    else
            //    {
            //    }
            //}
            //catch (Exception exc)
            //{
            //    LogWriter.Print("Exception Communicator->Login() " + exc, LogLevel.EXCEPTION);
            //}
            //Session["IsLogged"] = false;
            //LogWriter.Print("Login failed", LogLevel.LOG);
        }
    }
}